package com.sanyang.lawyer.service.Case;

import com.sanyang.lawyer.ResultApi.ResponseResult;
import com.sanyang.lawyer.entity.Case_court;
import com.sanyang.lawyer.entity.Case_law;
import com.sanyang.lawyer.mapper.Case.Case_courtMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Case_courtService {
    
    @Autowired
    private Case_courtMapper courtMapper;

    //根据id查询一条记录
    public Case_court queryByid(int court){
        return courtMapper.queryByid(court);
    }


    //查询所有
    public List<Case_court> selectAll(){
        return courtMapper.selectAll();
    }

    //查询出所有案件和法院关联的信息
    public List<Case_law> queryCourtByLaw(Case_law case_law){
        return courtMapper.queryCourtByLaw(case_law);
    }

    //根据案件id修改案件对应的日期。
    public void update_courtTime(Case_law case_law){
        courtMapper.update_courtTime(case_law);
    }
    
    

    //以法院名称查询
    public Case_court querybyname(String courtname){
        return this.courtMapper.querybyname(courtname);
    }

}
